Skip to content

test(cli): Add comprehensive E2E tests for CLI commands#101

Merged
boringdata merged 2 commits intomainfrom
feat/cli-e2e-tests
Feb 12, 2026
Merged

test(cli): Add comprehensive E2E tests for CLI commands#101
boringdata merged 2 commits intomainfrom
feat/cli-e2e-tests

Conversation

@boringdata
Copy link
Owner

Summary

  • Add E2E tests for all major CLI commands with real database operations
  • Add tests for cloud commands (login, logout, status, whoami)
  • Add tests for sync commands (pull, push, merge, branch)
  • Add tests for connect/integrations commands (cms, analytics, research)
  • Add tests for main CLI global options (--json, --quiet, --robot)
  • Add tests for command aliases (doc→docs, wf→workflow, stat→status)
  • Add tests for lazy loading of subcommands
  • Fix fetch E2E tests to mock fetch_raw instead of fetch method

Test coverage includes:

  • 255 new E2E tests across all CLI command groups
  • Real database operations with tmp_project fixture
  • Mocked external API calls (httpx, Apify, Firecrawl, Tavily)
  • Proper assertions using kurt.testing.assertions helpers

Test plan

  • All 255 E2E tests pass
  • Existing tests still pass
  • pytest runs without errors

🤖 Generated with Claude Code

boringagent and others added 2 commits February 11, 2026 14:57
- Remove unused imports (Path, pytest, MagicMock, patch)
- Fix import sorting (I001)
- Remove unused variable assignment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use patch.dict to mock the apify engine in _FETCH_ENGINES dictionary
- The function reference is stored at module load time, so patching
  the dictionary entry is required for the mock to take effect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@boringdata boringdata merged commit 32f7fb4 into main Feb 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants